package com.riteny.util;

/**
 * @author Riteny
 * 2021/8/30  10:58
 */
public class StringCompareEntity implements Comparable<StringCompareEntity> {

    private String compareString;

    private float similarity;

    public String getCompareString() {
        return compareString;
    }

    public void setCompareString(String compareString) {
        this.compareString = compareString;
    }

    public float getSimilarity() {
        return similarity;
    }

    public void setSimilarity(float similarity) {
        this.similarity = similarity;
    }


    @Override
    public int compareTo(StringCompareEntity o) {
        return Float.compare(o.similarity, this.similarity);
    }

    @Override
    public String toString() {
        return "StringCompareEntity{" +
                "compareString='" + compareString + '\'' +
                ", similarity=" + similarity +
                '}';
    }
}
